/*  1:   */ package org.jetbrains.jps.model.library.impl;
/*  2:   */ 
/*  3:   */

import org.jetbrains.annotations.NotNull;
import org.jetbrains.jps.model.JpsEventDispatcher;
import org.jetbrains.jps.model.ex.JpsElementChildRoleBase;
import org.jetbrains.jps.model.library.JpsLibraryRoot;
import org.jetbrains.jps.model.library.JpsLibraryRootListener;
import org.jetbrains.jps.model.library.JpsOrderRootType;

/*  4:   */
/*  5:   */
/*  6:   */
/*  7:   */
/*  8:   */
/*  9:   */ 
/* 10:   */ public class JpsLibraryRootRole
/* 11:   */   extends JpsElementChildRoleBase<JpsLibraryRoot>
/* 12:   */ {
/* 13:   */   private final JpsOrderRootType a;
/* 14:   */   
/* 15:   */   public JpsLibraryRootRole(@NotNull JpsOrderRootType paramJpsOrderRootType)
/* 16:   */   {
/* 17:32 */     super("library root");
/* 18:33 */     this.a = paramJpsOrderRootType;
/* 19:   */   }
/* 20:   */   
/* 21:   */   public void fireElementAdded(@NotNull JpsEventDispatcher paramJpsEventDispatcher, @NotNull JpsLibraryRoot paramJpsLibraryRoot)
/* 22:   */   {
/* 23:38 */     if (paramJpsEventDispatcher == null) {
/* 24:38 */       throw new IllegalArgumentException(String.format("Argument %s for @NotNull parameter of %s.%s must not be null", new Object[] { "0", "org/jetbrains/jps/model/library/impl/JpsLibraryRootRole", "fireElementAdded" }));
/* 25:   */     }
/* 26:38 */     if (paramJpsLibraryRoot == null) {
/* 27:38 */       throw new IllegalArgumentException(String.format("Argument %s for @NotNull parameter of %s.%s must not be null", new Object[] { "1", "org/jetbrains/jps/model/library/impl/JpsLibraryRootRole", "fireElementAdded" }));
/* 28:   */     }
/* 29:38 */     ((JpsLibraryRootListener)paramJpsEventDispatcher.getPublisher(JpsLibraryRootListener.class)).rootAdded(paramJpsLibraryRoot);
/* 30:   */   }
/* 31:   */   
/* 32:   */   public void fireElementRemoved(@NotNull JpsEventDispatcher paramJpsEventDispatcher, @NotNull JpsLibraryRoot paramJpsLibraryRoot)
/* 33:   */   {
/* 34:43 */     if (paramJpsEventDispatcher == null) {
/* 35:43 */       throw new IllegalArgumentException(String.format("Argument %s for @NotNull parameter of %s.%s must not be null", new Object[] { "0", "org/jetbrains/jps/model/library/impl/JpsLibraryRootRole", "fireElementRemoved" }));
/* 36:   */     }
/* 37:43 */     if (paramJpsLibraryRoot == null) {
/* 38:43 */       throw new IllegalArgumentException(String.format("Argument %s for @NotNull parameter of %s.%s must not be null", new Object[] { "1", "org/jetbrains/jps/model/library/impl/JpsLibraryRootRole", "fireElementRemoved" }));
/* 39:   */     }
/* 40:43 */     ((JpsLibraryRootListener)paramJpsEventDispatcher.getPublisher(JpsLibraryRootListener.class)).rootRemoved(paramJpsLibraryRoot);
/* 41:   */   }
/* 42:   */   
/* 43:   */   public boolean equals(Object paramObject)
/* 44:   */   {
/* 45:48 */     if (this == paramObject) {
/* 46:48 */       return true;
/* 47:   */     }
/* 48:49 */     if ((paramObject == null) || (getClass() != paramObject.getClass())) {
/* 49:49 */       return false;
/* 50:   */     }
/* 51:51 */     return this.a.equals(((JpsLibraryRootRole)paramObject).a);
/* 52:   */   }
/* 53:   */   
/* 54:   */   public int hashCode()
/* 55:   */   {
/* 56:56 */     return this.a.hashCode();
/* 57:   */   }
/* 58:   */ }



/* Location:           E:\idea\

 * Qualified Name:     org.jetbrains.jps.model.library.impl.JpsLibraryRootRole

 * JD-Core Version:    0.7.0.1

 */